var redis = require("redis"),
    // client = redis.createClient(6379, '114.215.114.174', { auth_pass: 'weixin-test' });
    client = redis.createClient(6379, 'xiweicheng.com', { auth_pass: 'weixin-test' });

// if you'd like to select database 3, instead of 0 (default), call 
// client.select(3, function() { /* ... */ }); 

client.on("error", function(err) {
    console.log("Error " + err);
});

client.setnx("foo2", "string val", redis.print);

client.get('foo2', function(err, res) {
	console.log(res);
});


// client.set("foo", "string val", redis.print);
// client.hset("hash key", "hashtest 1", "some value", redis.print);
// client.hset(["hash key", "hashtest 2", "some other value"], redis.print);
// client.hkeys("hash key", function (err, replies) {
//     console.log(replies.length + " replies:");
//     replies.forEach(function (reply, i) {
//         console.log("    " + i + ": " + reply);
//     });
//     client.quit();
// });
